package gazzera.node.core.messages;

import gazzera.utils.*;

import java.io.*;
import java.util.*;


public class ReadyToSend extends Message
{
	public FileID fileId = null;
	public BitSet avaiable = null;
	
	
	
	public ReadyToSend(FileID fileId, BitSet avaiable)
	{
		super();
		this.fileId = fileId;
		this.avaiable = avaiable;
	}

	public ReadyToSend()
	{
		super();
		
	}

	@Override
	protected void recv(DataInputStream s) throws IOException
	{
		fileId = readFileID(s);
		avaiable = readBitset(s);
	}

	@Override
	protected void send(DataOutputStream s) throws IOException
	{
		sendFileID(s, fileId);
		sendBitset(s, avaiable);
	}
}
